function y = e_penalty(x)
%  Extended Penalty Function 
%x0=[1,2,3,.....,n].
%fmin=n/2
%Author:shi yangyang
n=length(x);
t=ones(1,n-1);
q=ones(1,n);
for i=1:n-1
    t(i)=(x(i)-1)^2;
end
t=sum(t);
for i=1:n
    q(i)=x(i)^2;
end
q=sum(q);
y=t+(q-0.25)^2;